package com.carefree.bookmall.entity;

import java.io.Serializable;
import java.util.Objects;

/**
 * @ClassName:PhoneLocation
 * @Description: 手机号归属地对象
 * @Author qianyue
 */
public class PhoneLocation implements Serializable {

    private static final long serialVersionUID = - 6245826268048291694L;

    /**
     * 省份
     */
    private String province;
    /**
     * 城市
     */
    private String city;
    /**
     * 是否成功
     */
    private boolean success;
    /**
     * 手机号
     */
    private String phone;
    /**
     * 运营商
     */
    private String company;
    /**
     * 类型（电信、移动、联通）
     */
    private String type;
    /**
     * 区号
     */
    private String area;
    /**
     * 响应码
     */
    private int code;
    /**
     * 提示
     */
    private String tips;

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getTips() {
        return tips;
    }

    public void setTips(String tips) {
        this.tips = tips;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (! (o instanceof PhoneLocation)) return false;
        PhoneLocation that = (PhoneLocation) o;
        return isSuccess() == that.isSuccess() && getCode() == that.getCode() && Objects.equals(getProvince(), that.getProvince()) && Objects.equals(getCity(), that.getCity()) && Objects.equals(getPhone(), that.getPhone()) && Objects.equals(getCompany(), that.getCompany()) && Objects.equals(getType(), that.getType()) && Objects.equals(getArea(), that.getArea()) && Objects.equals(getTips(), that.getTips());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getProvince(), getCity(), isSuccess(), getPhone(), getCompany(), getType(), getArea(), getCode(), getTips());
    }

    @Override
    public String toString() {
        return "PhoneLocation{" +
                "province='" + province + '\'' +
                ", city='" + city + '\'' +
                ", success=" + success +
                ", phone='" + phone + '\'' +
                ", company='" + company + '\'' +
                ", type='" + type + '\'' +
                ", area='" + area + '\'' +
                ", code=" + code +
                ", tips='" + tips + '\'' +
                '}';
    }
}
